<?php

namespace Part01_SimpleFactoryMode\Code1;

$A = $_POST['A'];
$B = $_POST['B'];
$C = $_POST['C'];
$D = '';

if ($B == '+') {
    $D = $A + $C;
}
if ($B == '-') {
    $D = $A - $C;
}
if ($B == '*') {
    $D = $A * $C;
}
if ($B == '/') {
    $D = $A / $C;
}

echo "结果是" . $D;